# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=obex-data-server
pkgver=0.4.6
pkgrel=4
pkgdesc="D-Bus service for Obex access"
url="http://wiki.muiline.com/obex-data-server"
license="GPL-2.0-or-later"
arch="all"
depends=""
subpackages="$pkgname-doc"
makedepends="dbus-glib-dev openobex-dev gtk+-dev libusb-compat-dev bluez-dev"
source="http://tadas.dailyda.com/software/obex-data-server-$pkgver.tar.gz
	obex-data-server-0.4.6-build-fixes-1.patch"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd $srcdir/$pkgname-$pkgver
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--enable-bip=gdk-pixbuf \
		|| return 1
	make
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
}

sha512sums="5f924377fa45fec22a15d74fa45bf6ae98f56a9f8c98142cce6123e4ca6dcca042a636469b491f4103e230e270ad1af18dc38274b661795cac4beb4f7b798d5b  obex-data-server-0.4.6.tar.gz
a35f8b20aedbda2465cce20673be41f3e34ff6c306407f283f9156c70d9ecec38fdd9f9575f2bf201cb83ff0d464bca24c3b64d32ffd4ceba30a53d2f8e9ef49  obex-data-server-0.4.6-build-fixes-1.patch"
